<html>
	<head>
		<title></title>
		<style type="text/css">
			img{
				width: 200px;
			}
		</style>
	</head>
	<body>
		<img class="tu" src="img/1.jpg"/>
	</body>
	<script type="text/javascript">
		var tu = document.querySelector(".tu");
		var flg = 0;
		tu.onclick = function(){
			if(flg==0){
//				tu.src = "img/dy.jpg";
				tu.setAttribute("src","img/dy.jpg")
				flg =1;
			}else{
				tu.src = "img/1.jpg"
				flg=0;				
			}
			
		}
		
//		var src = tu.getAttribute("src");
		
//		tu.setAttribute("src","img/dy.jpg")
//		console.log(src)
		
		
	</script>
</html>